﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Database;
public partial class admin_HienthiKH : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var pm = new checkLogin();
        pm.redirectToLoginPage();
    }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (Convert.ToString(e.CommandArgument) == "dk")
        {
            KhachHang kh = new KhachHang();
            string tenkh = Convert.ToString(((HyperLink)e.Item.FindControl("hplTenKH")).Text);
            kh.XoaKH(tenkh);
            LayDuLieu();
            Response.Redirect("HienthiKH.aspx");
        }
        else
        {
            LayDuLieu();
        }
    }

    public void LayDuLieu()
    {


        PagedDataSource pgitems = new PagedDataSource();
        DataView dv = new DataView(KhachHang.DSKH().Tables[0]);

    }
}
